{% comment %}
	Important that the form id is specified the way it is. The client code uses this id to
	grab the form values when setting props.
{% endcomment %}

<form id="{{wid}}-props-form">

	<div class="item">
		<div class="label">Title</div>
		<input id='{{wid}}-title' name='title' size="30"/>
	</div>
	<div class="item">
		<div class="label">Type</div>
		<select name="custom-type" >
		<option value="manual">Manual</option>
		<option value="xml"> XML</option> 
		</select>
	</div>
	<div id="{{wid}}-custom-type-manual">
		<div class="item">
			<div class="label">Number</div>
			<input type="text" name="custom-count" size="30"/>
		</div>
	</div>
	<div id="{{wid}}-custom-type-xml">
		<div class="item">
			<div class="label">Feed Url</div>
			<input type="text" name="custom-feed-url" size="30"/>
		</div>
		<div class="item">
			<div class="label">xpath to number</div>
			<input type="text" name="custom-xpath-num" size="30"/>
		</div>
		<div class="item">
			<div class="label">xpath to geocoord(s)</div>
			<input type="text" name="custom-xpath-geo" size="30"/>
		</div>
	</div>
	
	<script>
	(function()
			{
$("#{{wid}}-custom-type-xml").hide()
$("#{{wid}}-props-form select[name='custom-type']").change(function(e)
		{
			if(e.target.value=='manual')
			{
				$("#{{wid}}-custom-type-manual").show();
				$("#{{wid}}-custom-type-xml").hide();
			}
			else
			{
				$("#{{wid}}-custom-type-manual").hide();
				$("#{{wid}}-custom-type-xml").show();
			}
			$_grid.widget_grid('updateProps', '{{wid}}')
		});
})();
	</script>
	
{% include "trend.html" %}
{% include "action.html" %}
</form>



